#ifndef _RETRO_PLAYER_GRIDMAP
#define _RETRO_PLAYER_GRIDMAP

#include "player.graphic.h"
#include "player.fpscounter.h"

namespace Retro
{
  namespace Player
  {
    namespace Graphic
    {
      class GridMap : public IGraphic
      {
      private:
        Device::Display::Texture* mTexture;

        const Data::GridMap*  mMap;
        BOOL* mLayerDisplay;

      public:
        INL const Data::GridMap*  getMap() const
        {
          return mMap;
        }

        INL BOOL* getLayerDisplay()
        {
          return mLayerDisplay;
        }

        INL Data::Texture*  getTexture()
        {
          return mTexture ? (Data::Texture*)mTexture->getResource() : NULL;
        }

        VOID  setMap(const Data::GridMap* iValue);

        GridMap();

        VOID init(Display::DisplayDevice* iDevice);
        VOID uninit(Display::DisplayDevice* iDevice);
        VOID render(
          Display::DisplayDevice* iDevice,
          INT x,
          INT y
        ) const;
      };
    }
  }
}

#endif
